package com.jmoney.luckeylink.controller;

import static io.restassured.RestAssured.given;
import io.restassured.RestAssured;
import io.restassured.config.SSLConfig;
import io.restassured.response.Response;

public class LekeU_OpinionFeedback_Controller {
	
	   /**
	    * 指定接口地址，获取意见反馈的信息
	    * @param ApiUrl
	    * @return UserDetail
	    */
	   public static Object[] GetOpinionFeedbackInfo(String ApiUrl,String Param) throws Exception{

	       Response response = given()
	               .config((RestAssured.config().sslConfig(new SSLConfig().relaxedHTTPSValidation())))
	               .contentType("application/json")
	               .log().all()
	               .request()
	               .body(Param)
	               .when()
	               .post(ApiUrl);

	       String Json = response.asString();
	       
	       int status_code = response.jsonPath().getInt("status_code");
	       String message = response.jsonPath().get("message");

	       Object[] GetOpinionFeedbackInfo ={Json,status_code,message};
	       
	       return GetOpinionFeedbackInfo;
	   }
}
